const paramsoption = {
  state: {
    comboOption: ['序号','状态开关','类型ID','类型名称','优惠活动绑定','创建时间','创建人','状态'],
    discountsOption:['序号','状态开关','类型名称','优惠活动ID','优惠活动名称','广告币数量（个）','返现数量（个）','单价(人民币)','总成交单量','成交总额(人民币)','备注','创建时间','创建人','状态'],
    coordinatedOption:['序号','主账号邮箱/手机号','主账号ID','状态','协作者详情','今日充值金额','累计充值总金额','当前协作者账号数','今日消耗账号数','协作者今日总消耗（广告币）','备注']
  },
  mutations: {
    SET_COMBOOPTION: (state, option) => {
      state.comboOption = option
      localStorage.setItem('comboOption',JSON.stringify(option));
    },

    SET_DISCOUNTSOPTION: (state, option) => {
      state.discountsOption = option
      localStorage.setItem('discountsOption',JSON.stringify(option));
    },
    SET_COORDINATEDOPTION:(state, option) => {
      state.coordinatedOption = option
      localStorage.setItem('coordinatedOption',JSON.stringify(option));
    },
  },
  actions: {
    // // 生成路由
    // GenerateRoutes({ commit }) {
    //   return new Promise(resolve => {
    //     // 向后端请求路由数据
    //     getRouters().then(res => {
    //       const sdata = JSON.parse(JSON.stringify(res.data))
    //       const rdata = JSON.parse(JSON.stringify(res.data))
    //       const sidebarRoutes = filterAsyncRouter(sdata)
    //       const rewriteRoutes = filterAsyncRouter(rdata, false, true)
    //       const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
    //       rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
    //       router.addRoutes(asyncRoutes);
    //       commit('SET_ROUTES', rewriteRoutes)
    //       commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
    //       commit('SET_DEFAULT_ROUTES', sidebarRoutes)
    //       commit('SET_TOPBAR_ROUTES', sidebarRoutes)
    //       resolve(rewriteRoutes)
    //     })
    //   })
    // }
  }
}
export default paramsoption
